package com.sumer.brain.sys.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sumer.brain.sys.model.entity.GenTable;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sumer.brain.sys.model.req.GenTableReq;

import java.util.List;
import java.util.Map;

public interface GenTableService extends IService<GenTable> {

    Page<GenTable> dbPage(Page<GenTable> page, GenTableReq genTableReq);

    List<GenTable> selectDbTableListByNames(List<String> tableNames);

    void importGenTable(List<GenTable> tableList, String operator);

    int deleteGenTableByIds(Long[] tableIds);

    List<GenTable> selectGenTableAll();

    Map<String, String> previewCode(Long tableId);

    byte[] downloadCode(String[] tableNames);

    GenTable selectGenTableById(Long tableId);

    void validateEdit(GenTable genTable);

    void updateGenTable(GenTable genTable);

    void synchDb(String tableName);
}
